public class Sushu {
    public static void main(String[] args) {
        System.out.println("请打印出1~100中的素数");

        for (int i = 2; i <= 100; i++) {
            if(isSushu(i)){
                System.out.print(i+" ");
            }
        }
    }

    public static boolean isSushu(int n){
        if(n <= 1){
            return false;
        }

        for (int i = 2; i <= Math.sqrt(n); i++) {
            if(n % i == 0) {
                return false;
            }
        }
        return true;
        }

}
